package twentytwentyone_3;

import java.util.Arrays;

/**
 * @Author: Zahi
 * @Description:
 * @Date Created in 2021-03-24 16:59
 * @Modified By:
 */
public class IsOneBitCharacter_717 {
    public static void main(String[] args){

    }

    public static boolean isOneBitCharacter(int[] bits){
        int i = 0;
        while (i < bits.length - 1) {
            i += bits[i] + 1;
        }
        return i == bits.length - 1;
    }
}
